//
// Created by REEJI2219 on 2024-08-08.
//

#ifndef LINKLIST_H
#define LINKLIST_H
typedef int ElemType;
class Node {
private:
    ElemType data;
    Node* next;
public:
    Node(ElemType data);
    ~Node();
    ElemType getData();
    void addNext(Node* node);
    Node* getNext();
};
class LinkList {
private:
    Node* header;
    Node* traval(Node *node);
public:
    LinkList();
    ~LinkList();
    bool append(ElemType data);
    bool get(int i,ElemType *data);
    bool remove(int i,ElemType *data);
    bool insert(int i,ElemType data);
    void printList();
    void margeList(LinkList* la,LinkList* lb,LinkList* lc);
    bool take(ElemType *data);
    bool traval();
    bool traval2();
};
#endif //LINKLIST_H
